/**
 * 
 */
package com.agilegroup.crm.requests;

import com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest;

/**
 * @author Hisham
 *
 */
	public class GenericJsonRequest<T> extends SpringAndroidSpiceRequest<T>{
	
		private String empId;
		private Class<T> clazz;
		private String url;
		
		public GenericJsonRequest(Class<T> clazz,String empId,String url) {
			super(clazz);
			this.clazz=clazz;
			this.empId=empId;
			this.url=url;
		}
		
		@Override
		public T loadDataFromNetwork() throws Exception {
			return getRestTemplate().getForObject(url+empId+".json", clazz);
		}
	}
